<?php
/**
* Checkuser name action
* @author: trungdt
* @since: Jan 31, 2011
* 
* Change logs
* Jan  31, 2011 - trungdt - first create
*/

// Bail in case someone has visited us directly, or the Exponent framework is
// otherwise not initialized.
if (!defined('EXPONENT')) exit('');
$id=htmlentities(trim($_POST['username']));
$id_backup=$_POST['username'];
$i18n = exponent_lang_loadFile('modules/navigationmodule/actions/check_username.php');

// làm đẹp lại cái ID
if (strlen($id)==0)
    die();
$temp= $db->selectObject('user',"username = '{$id}'");
if (!($temp == array()))
{
	die( "<font color=red>".$i18n['error1']."</font>"); // return 0 for 
}
else
{
	die("<font color=blue>".$i18n['error2']."</font>"); // return 0 for 
}
?>
